$(function() {
    $("#form").validate({
        rules : {
            "cotherloan.Id" : {
               
               digits : true,
            },
            "cotherloan.name" : {
               maxlength :127,
            },
            "cotherloan.loandata" : {
            },
            "cotherloan.duedate" : {
            },
            "cotherloan.loanrate" : {
               number : true,
            },
            "cotherloan.loanamount" : {
               number : true,
            },
            "cotherloan.cid" : {
               digits : true,
            },
        },
    messages : {
        "cotherloan.Id" : {
            required : '请填写!',
               digits : '只允许填数字  !',
        },
        "cotherloan.name" : {
               maxlength : '借款人名称 长度超限,允许最大长度为127!',
        },
        "cotherloan.loandata" : {
        },
        "cotherloan.duedate" : {
        },
        "cotherloan.loanrate" : {
               number : '借款利率输入的数字不合法  !',
        },
        "cotherloan.loanamount" : {
               number : '借款金额输入的数字不合法  !',
        },
        "cotherloan.cid" : {
               digits : '只允许填数字  !',
        },
       }
});
});
